package com.AO.DAO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FoodMaterialFoodRelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "food_material_food_relation", catalog = "delicacy")
public class FoodMaterialFoodRelation implements java.io.Serializable {

	// Fields

	private Integer id;
	private MaterialFood materialFood;
	private Food food;
	private Integer materialFoodLevel;
	private String count;

	// Constructors

	/** default constructor */
	public FoodMaterialFoodRelation() {
	}

	/** full constructor */
	public FoodMaterialFoodRelation(Integer id, MaterialFood materialFood,
			Food food, Integer materialFoodLevel, String count) {
		this.id = id;
		this.materialFood = materialFood;
		this.food = food;
		this.materialFoodLevel = materialFoodLevel;
		this.count = count;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "material_food_id", nullable = false)
	public MaterialFood getMaterialFood() {
		return this.materialFood;
	}

	public void setMaterialFood(MaterialFood materialFood) {
		this.materialFood = materialFood;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food_id", nullable = false)
	public Food getFood() {
		return this.food;
	}

	public void setFood(Food food) {
		this.food = food;
	}

	@Column(name = "material_food_level", nullable = false)
	public Integer getMaterialFoodLevel() {
		return this.materialFoodLevel;
	}

	public void setMaterialFoodLevel(Integer materialFoodLevel) {
		this.materialFoodLevel = materialFoodLevel;
	}

	@Column(name = "count", nullable = false)
	public String getCount() {
		return this.count;
	}

	public void setCount(String count) {
		this.count = count;
	}

}